<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        async function fun1() {
            // return 10
            // throw new Error("somthing wrong")
            let promise = Promise.reject("hehe")
            return promise
        }
        let promise = fun1()
        promise.then(
            function(value){
                console.log("success" + value)
            }
        ).catch(
            function(value){
                console.log("fail" + value)
            }
        )
    </script>
</head>
<body>
    
</body>
</html>